<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MNN: include/Rect.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MNN
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Rect.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_rect_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">//  Rect.h</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">//  MNN</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">//  Modified by jiangxiaotang on 2018/09/19.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">//  Copyright © 2018, Alibaba Group Holding Limited</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * Copyright 2006 The Android Open Source Project</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * Use of this source code is governed by a BSD-style license that can be</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * found in the LICENSE file.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">/* Generated by tools/bookmaker from include/core/Rect.h and docs/SkRect_Reference.bmh</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">   on 2018-07-13 08:15:11. Additional documentation and examples can be found at:</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">   https://skia.org/user/api/SkRect_Reference</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">   You may edit either file directly. Structural changes to public interfaces require</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">   editing both files. After editing docs/SkRect_Reference.bmh, run:</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">       bookmaker -b docs -i include/core/Rect.h -p</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">   to create an updated version of this file.</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#ifndef SkRect_DEFINED</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#define SkRect_DEFINED</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;math.h&gt;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;utility&gt;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_m_n_n_define_8h.html">MNNDefine.h</a>&quot;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_m_n_n.html">MNN</a> {</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">namespace </span>CV {</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_point.html">   37</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_m_n_n_1_1_c_v_1_1_point.html">Point</a> {</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_point.html#a55914f6553f4649a29cfda5cc6ef2368">   38</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_point.html#a55914f6553f4649a29cfda5cc6ef2368">fX</a>;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_point.html#ad1aa7aaf6cc726034f15ebd133b288b8">   39</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_point.html#ad1aa7aaf6cc726034f15ebd133b288b8">fY</a>;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_point.html#a2039eaa2814e289541b3f895af6452b4">   41</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_point.html#a2039eaa2814e289541b3f895af6452b4">set</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y) {</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <a class="code" href="struct_m_n_n_1_1_c_v_1_1_point.html#a55914f6553f4649a29cfda5cc6ef2368">fX</a> = x;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <a class="code" href="struct_m_n_n_1_1_c_v_1_1_point.html#ad1aa7aaf6cc726034f15ebd133b288b8">fY</a> = y;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    }</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;};</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html">   54</a></span>&#160;<span class="keyword">struct </span><a class="code" href="_m_n_n_define_8h.html#a692428e2a0af8ffb79376d223a0695ab">MNN_PUBLIC</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> {</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a64258783d446020019f2062282afdcdd">   55</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a64258783d446020019f2062282afdcdd">fLeft</a>;   </div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a208f7896ff9557d5cef93add6696d15f">   56</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a208f7896ff9557d5cef93add6696d15f">fTop</a>;    </div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0359c6cdfd938d0b8d0396315d996904">   57</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0359c6cdfd938d0b8d0396315d996904">fRight</a>;  </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a405b1f172d1edcd94b5bd9958a1bf2de">   58</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a405b1f172d1edcd94b5bd9958a1bf2de">fBottom</a>; </div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#af67332903693248a739ca9f70cb0b5d4">   67</a></span>&#160;    <span class="keyword">static</span> constexpr <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#af67332903693248a739ca9f70cb0b5d4">MakeEmpty</a>() {</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>{0, 0, 0, 0};</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">#ifdef SK_SUPPORT_LEGACY_RECTMAKELARGEST</span></div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    <span class="keyword">static</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> MakeLargest() {</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="keywordflow">return</span> {SK_ScalarMin, SK_ScalarMin, SK_ScalarMax, SK_ScalarMax};</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a02ddfe89f2ec3ac3270615a3d0ff2394">   89</a></span>&#160;    <span class="keyword">static</span> constexpr <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a02ddfe89f2ec3ac3270615a3d0ff2394">MakeWH</a>(<span class="keywordtype">float</span> w, <span class="keywordtype">float</span> h) {</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>{0, 0, w, h};</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    }</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ada503f876d48a20715410a6d693eb588">  103</a></span>&#160;    <span class="keyword">static</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ada503f876d48a20715410a6d693eb588">MakeIWH</a>(<span class="keywordtype">int</span> w, <span class="keywordtype">int</span> h) {</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> r;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#af779724236a4e6f70a1c83e64fb34f62">set</a>(0, 0, (<span class="keywordtype">float</span>)(w), (<span class="keywordtype">float</span>)(h));</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;        <span class="keywordflow">return</span> r;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    }</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a383b4f2f97e8a4cb7e78388f599cc9c4">  118</a></span>&#160;    <span class="keyword">static</span> constexpr <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a383b4f2f97e8a4cb7e78388f599cc9c4">MakeLTRB</a>(<span class="keywordtype">float</span> l, <span class="keywordtype">float</span> t, <span class="keywordtype">float</span> r, <span class="keywordtype">float</span> b) {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>{l, t, r, b};</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    }</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a84c940fce58ec7c6bdde197022e549da">  131</a></span>&#160;    <span class="keyword">static</span> constexpr <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a84c940fce58ec7c6bdde197022e549da">MakeXYWH</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> w, <span class="keywordtype">float</span> h) {</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>{x, y, x + w, y + h};</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    }</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ad29c16121be6701ae8bddfc19b8e0af8">  141</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ad29c16121be6701ae8bddfc19b8e0af8">isEmpty</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        <span class="comment">// We write it as the NOT of a non-empty rect, so we will return true if any values</span></div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        <span class="comment">// are NaN.</span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">return</span> !(fLeft &lt; fRight &amp;&amp; fTop &lt; fBottom);</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;    }</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ac0571b2879b52e0c733428b47c3880e2">  153</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ac0571b2879b52e0c733428b47c3880e2">isSorted</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keywordflow">return</span> fLeft &lt;= fRight &amp;&amp; fTop &lt;= fBottom;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    }</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#af58f6d07f1c5cb1622f3878ee9d3e8f2">  162</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#af58f6d07f1c5cb1622f3878ee9d3e8f2">x</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <span class="keywordflow">return</span> fLeft;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    }</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a1a01972b232acc3d8a90719e548d919e">  171</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a1a01972b232acc3d8a90719e548d919e">y</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;        <span class="keywordflow">return</span> fTop;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    }</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa160cb2eb1fc6135ccc3877d8c87b510">  180</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa160cb2eb1fc6135ccc3877d8c87b510">left</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="keywordflow">return</span> fLeft;</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    }</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a01177c3c1c082e37bc19527e7c2b663f">  189</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a01177c3c1c082e37bc19527e7c2b663f">top</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        <span class="keywordflow">return</span> fTop;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    }</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a9c059082d158da6e4e4bf1b8a3201041">  198</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a9c059082d158da6e4e4bf1b8a3201041">right</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="keywordflow">return</span> fRight;</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    }</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00207"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aadf1130e452a00fe072058829c8c8bcd">  207</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aadf1130e452a00fe072058829c8c8bcd">bottom</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <span class="keywordflow">return</span> fBottom;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    }</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a95c8b45618876fd833da41c5b3be6954">  216</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a95c8b45618876fd833da41c5b3be6954">width</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <span class="keywordflow">return</span> fRight - fLeft;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    }</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa7fc5d37b129f7f1f29a1e42f6539ad3">  225</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa7fc5d37b129f7f1f29a1e42f6539ad3">height</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        <span class="keywordflow">return</span> fBottom - fTop;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    }</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a3a4c5536bc1d9efff77d41da5645e29d">  234</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a3a4c5536bc1d9efff77d41da5645e29d">centerX</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="comment">// don&#39;t use floatHalf(fLeft + fBottom) as that might overflow before the 0.5</span></div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        <span class="keywordflow">return</span> 0.5f * (fLeft) + 0.5f * (fRight);</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;    }</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a78fa5256843c96283961017ae007efdc">  244</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a78fa5256843c96283961017ae007efdc">centerY</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        <span class="comment">// don&#39;t use floatHalf(fTop + fBottom) as that might overflow before the 0.5</span></div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <span class="keywordflow">return</span> 0.5f * (fTop) + 0.5f * (fBottom);</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;    }</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a2b3840d59c7e57fea47cf22cb380443c">  255</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a2b3840d59c7e57fea47cf22cb380443c">setEmpty</a>() {</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        *<span class="keyword">this</span> = MakeEmpty();</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;    }</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;</div><div class="line"><a name="l00268"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#af779724236a4e6f70a1c83e64fb34f62">  268</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#af779724236a4e6f70a1c83e64fb34f62">set</a>(<span class="keywordtype">float</span> left, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom) {</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        fLeft   = left;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        fTop    = top;</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        fRight  = right;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        fBottom = bottom;</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    }</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;</div><div class="line"><a name="l00284"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a532c1b7e17793f40cf2dccde039d7930">  284</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a532c1b7e17793f40cf2dccde039d7930">setLTRB</a>(<span class="keywordtype">float</span> left, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom) {</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        this-&gt;set(left, top, right, bottom);</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    }</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a6e83b53b1d3474fedcab0b52660acd8e">  298</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a6e83b53b1d3474fedcab0b52660acd8e">iset</a>(<span class="keywordtype">int</span> left, <span class="keywordtype">int</span> top, <span class="keywordtype">int</span> right, <span class="keywordtype">int</span> bottom) {</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        fLeft   = (float)(left);</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        fTop    = (float)(top);</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;        fRight  = (float)(right);</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;        fBottom = (float)(bottom);</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    }</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;</div><div class="line"><a name="l00312"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aab144e0eca8fa19ae44d109ae4fe0d94">  312</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aab144e0eca8fa19ae44d109ae4fe0d94">isetWH</a>(<span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height) {</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;        fLeft = fTop = 0;</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;        fRight       = (float)(width);</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;        fBottom      = (float)(height);</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    }</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;</div><div class="line"><a name="l00326"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a6aece72c48ea4638f1a21f0a9aa4fed6">  326</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a6aece72c48ea4638f1a21f0a9aa4fed6">setXYWH</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y, <span class="keywordtype">float</span> width, <span class="keywordtype">float</span> height) {</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;        fLeft   = x;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;        fTop    = y;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;        fRight  = x + width;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        fBottom = y + height;</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;    }</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;</div><div class="line"><a name="l00339"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a3a00e95e1c00e82ac601a21ac6694463">  339</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a3a00e95e1c00e82ac601a21ac6694463">setWH</a>(<span class="keywordtype">float</span> width, <span class="keywordtype">float</span> height) {</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        fLeft   = 0;</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;        fTop    = 0;</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        fRight  = width;</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;        fBottom = height;</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    }</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div><div class="line"><a name="l00357"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a72efee72527d4c6ae1a9475f629c6ac0">  357</a></span>&#160;    <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a72efee72527d4c6ae1a9475f629c6ac0">makeOffset</a>(<span class="keywordtype">float</span> dx, <span class="keywordtype">float</span> dy)<span class="keyword"> const </span>{</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        <span class="keywordflow">return</span> MakeLTRB(fLeft + dx, fTop + dy, fRight + dx, fBottom + dy);</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;    }</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;</div><div class="line"><a name="l00372"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a3b5d14a019fd282f7e05cef663554fbc">  372</a></span>&#160;    <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a3b5d14a019fd282f7e05cef663554fbc">makeInset</a>(<span class="keywordtype">float</span> dx, <span class="keywordtype">float</span> dy)<span class="keyword"> const </span>{</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        <span class="keywordflow">return</span> MakeLTRB(fLeft + dx, fTop + dy, fRight - dx, fBottom - dy);</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;    }</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;</div><div class="line"><a name="l00387"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#adef81d24e7865ec630cc6c19ffadecc9">  387</a></span>&#160;    <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#adef81d24e7865ec630cc6c19ffadecc9">makeOutset</a>(<span class="keywordtype">float</span> dx, <span class="keywordtype">float</span> dy)<span class="keyword"> const </span>{</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;        <span class="keywordflow">return</span> MakeLTRB(fLeft - dx, fTop - dy, fRight + dx, fBottom + dy);</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    }</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;</div><div class="line"><a name="l00401"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a91a1f1f6e70c37968942769543a49e2d">  401</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a91a1f1f6e70c37968942769543a49e2d">offset</a>(<span class="keywordtype">float</span> dx, <span class="keywordtype">float</span> dy) {</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        fLeft += dx;</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;        fTop += dy;</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        fRight += dx;</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;        fBottom += dy;</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;    }</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;</div><div class="line"><a name="l00414"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa514595203fd1b7523507c6f97646781">  414</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa514595203fd1b7523507c6f97646781">offsetTo</a>(<span class="keywordtype">float</span> newX, <span class="keywordtype">float</span> newY) {</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        fRight += newX - fLeft;</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        fBottom += newY - fTop;</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;        fLeft = newX;</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        fTop  = newY;</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    }</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;</div><div class="line"><a name="l00431"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#acec8cf044453b6b618d993430ec08973">  431</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#acec8cf044453b6b618d993430ec08973">inset</a>(<span class="keywordtype">float</span> dx, <span class="keywordtype">float</span> dy) {</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;        fLeft += dx;</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;        fTop += dy;</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;        fRight -= dx;</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;        fBottom -= dy;</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;    }</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;</div><div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ab616f3320e1872a2f9808f0e8d5a86c8">  448</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ab616f3320e1872a2f9808f0e8d5a86c8">outset</a>(<span class="keywordtype">float</span> dx, <span class="keywordtype">float</span> dy) {</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;        this-&gt;inset(-dx, -dy);</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;    }</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;</div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;    <span class="keywordtype">bool</span> intersect(<span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>&amp; r);</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;</div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    <span class="keywordtype">bool</span> intersect(<span class="keywordtype">float</span> left, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom);</div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;</div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;    <span class="keywordtype">bool</span> intersect(<span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>&amp; a, <span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>&amp; b);</div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> Intersects(<span class="keywordtype">float</span> al, <span class="keywordtype">float</span> at, <span class="keywordtype">float</span> ar, <span class="keywordtype">float</span> ab, <span class="keywordtype">float</span> bl, <span class="keywordtype">float</span> bt, <span class="keywordtype">float</span> br, <span class="keywordtype">float</span> bb) {</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;        <span class="keywordtype">float</span> L = std::max(al, bl);</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;        <span class="keywordtype">float</span> R = std::min(ar, br);</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;        <span class="keywordtype">float</span> T = std::max(at, bt);</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;        <span class="keywordtype">float</span> B = std::min(ab, bb);</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;        <span class="keywordflow">return</span> L &lt; R &amp;&amp; T &lt; B;</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    }</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00511"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a8b3545f0e12bff349c1071f0a0b655fb">  511</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a8b3545f0e12bff349c1071f0a0b655fb">intersects</a>(<span class="keywordtype">float</span> left, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom)<span class="keyword"> const </span>{</div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;        <span class="keywordflow">return</span> Intersects(fLeft, fTop, fRight, fBottom, left, top, right, bottom);</div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;    }</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;</div><div class="line"><a name="l00521"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a1751c3784411427f17270f3c68e0093e">  521</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a1751c3784411427f17270f3c68e0093e">intersects</a>(<span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>&amp; r)<span class="keyword"> const </span>{</div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;        <span class="keywordflow">return</span> Intersects(fLeft, fTop, fRight, fBottom, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a64258783d446020019f2062282afdcdd">fLeft</a>, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a208f7896ff9557d5cef93add6696d15f">fTop</a>, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0359c6cdfd938d0b8d0396315d996904">fRight</a>, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a405b1f172d1edcd94b5bd9958a1bf2de">fBottom</a>);</div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;    }</div><div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;</div><div class="line"><a name="l00532"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a344296c6a536e3c5734e6f4ff431b33a">  532</a></span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a344296c6a536e3c5734e6f4ff431b33a">Intersects</a>(<span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>&amp; a, <span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>&amp; b) {</div><div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        <span class="keywordflow">return</span> Intersects(a.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a64258783d446020019f2062282afdcdd">fLeft</a>, a.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a208f7896ff9557d5cef93add6696d15f">fTop</a>, a.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0359c6cdfd938d0b8d0396315d996904">fRight</a>, a.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a405b1f172d1edcd94b5bd9958a1bf2de">fBottom</a>, b.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a64258783d446020019f2062282afdcdd">fLeft</a>, b.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a208f7896ff9557d5cef93add6696d15f">fTop</a>, b.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0359c6cdfd938d0b8d0396315d996904">fRight</a>, b.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a405b1f172d1edcd94b5bd9958a1bf2de">fBottom</a>);</div><div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;    }</div><div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;</div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;    <span class="keywordtype">void</span> join(<span class="keywordtype">float</span> left, <span class="keywordtype">float</span> top, <span class="keywordtype">float</span> right, <span class="keywordtype">float</span> bottom);</div><div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;</div><div class="line"><a name="l00558"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ae7f779242e85a6a56b230c15fb10e88d">  558</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ae7f779242e85a6a56b230c15fb10e88d">join</a>(<span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>&amp; r) {</div><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;        this-&gt;join(r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a64258783d446020019f2062282afdcdd">fLeft</a>, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a208f7896ff9557d5cef93add6696d15f">fTop</a>, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0359c6cdfd938d0b8d0396315d996904">fRight</a>, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a405b1f172d1edcd94b5bd9958a1bf2de">fBottom</a>);</div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;    }</div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;</div><div class="line"><a name="l00571"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#acc003e093d8ccb40326cd4bb45f80c50">  571</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#acc003e093d8ccb40326cd4bb45f80c50">joinNonEmptyArg</a>(<span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>&amp; r) {</div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;        <a class="code" href="_m_n_n_define_8h.html#ae353a9c1a1afe84eeefafac7d7f5bed1">MNN_ASSERT</a>(!r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ad29c16121be6701ae8bddfc19b8e0af8">isEmpty</a>());</div><div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;        <span class="comment">// if we are empty, just assign</span></div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;        <span class="keywordflow">if</span> (fLeft &gt;= fRight || fTop &gt;= fBottom) {</div><div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;            *<span class="keyword">this</span> = r;</div><div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;            this-&gt;joinPossiblyEmptyRect(r);</div><div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;        }</div><div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;    }</div><div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;</div><div class="line"><a name="l00587"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a8b8118759f998e6e692bddeb4f238c6d">  587</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a8b8118759f998e6e692bddeb4f238c6d">joinPossiblyEmptyRect</a>(<span class="keyword">const</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a>&amp; r) {</div><div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;        fLeft   = std::min(fLeft, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa160cb2eb1fc6135ccc3877d8c87b510">left</a>());</div><div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;        fTop    = std::min(fTop, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a01177c3c1c082e37bc19527e7c2b663f">top</a>());</div><div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;        fRight  = std::max(fRight, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a9c059082d158da6e4e4bf1b8a3201041">right</a>());</div><div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;        fBottom = std::max(fBottom, r.<a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#aadf1130e452a00fe072058829c8c8bcd">bottom</a>());</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;    }</div><div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;</div><div class="line"><a name="l00601"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a40c7f529bcd4fcf4ed549ae758e0185e">  601</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a40c7f529bcd4fcf4ed549ae758e0185e">contains</a>(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y)<span class="keyword"> const </span>{</div><div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;        <span class="keywordflow">return</span> x &gt;= fLeft &amp;&amp; x &lt; fRight &amp;&amp; y &gt;= fTop &amp;&amp; y &lt; fBottom;</div><div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;    }</div><div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;</div><div class="line"><a name="l00609"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0f11ca8d611000b282c38daa3dc4cab9">  609</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0f11ca8d611000b282c38daa3dc4cab9">sort</a>() {</div><div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;        <span class="keyword">using</span> std::swap;</div><div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;        <span class="keywordflow">if</span> (fLeft &gt; fRight) {</div><div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;            swap(fLeft, fRight);</div><div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;        }</div><div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;</div><div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;        <span class="keywordflow">if</span> (fTop &gt; fBottom) {</div><div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;            swap(fTop, fBottom);</div><div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;        }</div><div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;    }</div><div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;</div><div class="line"><a name="l00626"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a380de5592d15cce1ccdcd65d6f6233f0">  626</a></span>&#160;    <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html">Rect</a> <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#a380de5592d15cce1ccdcd65d6f6233f0">makeSorted</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;        <span class="keywordflow">return</span> MakeLTRB(std::min(fLeft, fRight), std::min(fTop, fBottom), std::max(fLeft, fRight),</div><div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;                        std::max(fTop, fBottom));</div><div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;    }</div><div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;</div><div class="line"><a name="l00636"></a><span class="lineno"><a class="line" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ac1b5a5bc3392e58b7e9fb00da124a861">  636</a></span>&#160;    <span class="keyword">const</span> <span class="keywordtype">float</span>* <a class="code" href="struct_m_n_n_1_1_c_v_1_1_rect.html#ac1b5a5bc3392e58b7e9fb00da124a861">asScalars</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;        <span class="keywordflow">return</span> &amp;fLeft;</div><div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;    }</div><div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;};</div><div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;</div><div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;} <span class="comment">// namespace CV</span></div><div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;} <span class="comment">// namespace MNN</span></div><div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_adef81d24e7865ec630cc6c19ffadecc9"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#adef81d24e7865ec630cc6c19ffadecc9">MNN::CV::Rect::makeOutset</a></div><div class="ttdeci">Rect makeOutset(float dx, float dy) const</div><div class="ttdef"><b>Definition:</b> Rect.h:387</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a84c940fce58ec7c6bdde197022e549da"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a84c940fce58ec7c6bdde197022e549da">MNN::CV::Rect::MakeXYWH</a></div><div class="ttdeci">static constexpr Rect MakeXYWH(float x, float y, float w, float h)</div><div class="ttdef"><b>Definition:</b> Rect.h:131</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a40c7f529bcd4fcf4ed549ae758e0185e"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a40c7f529bcd4fcf4ed549ae758e0185e">MNN::CV::Rect::contains</a></div><div class="ttdeci">bool contains(float x, float y) const</div><div class="ttdef"><b>Definition:</b> Rect.h:601</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_ae7f779242e85a6a56b230c15fb10e88d"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#ae7f779242e85a6a56b230c15fb10e88d">MNN::CV::Rect::join</a></div><div class="ttdeci">void join(const Rect &amp;r)</div><div class="ttdef"><b>Definition:</b> Rect.h:558</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a95c8b45618876fd833da41c5b3be6954"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a95c8b45618876fd833da41c5b3be6954">MNN::CV::Rect::width</a></div><div class="ttdeci">float width() const</div><div class="ttdef"><b>Definition:</b> Rect.h:216</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a02ddfe89f2ec3ac3270615a3d0ff2394"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a02ddfe89f2ec3ac3270615a3d0ff2394">MNN::CV::Rect::MakeWH</a></div><div class="ttdeci">static constexpr Rect MakeWH(float w, float h)</div><div class="ttdef"><b>Definition:</b> Rect.h:89</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a208f7896ff9557d5cef93add6696d15f"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a208f7896ff9557d5cef93add6696d15f">MNN::CV::Rect::fTop</a></div><div class="ttdeci">float fTop</div><div class="ttdoc">smaller y-axis bounds</div><div class="ttdef"><b>Definition:</b> Rect.h:56</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a405b1f172d1edcd94b5bd9958a1bf2de"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a405b1f172d1edcd94b5bd9958a1bf2de">MNN::CV::Rect::fBottom</a></div><div class="ttdeci">float fBottom</div><div class="ttdoc">larger y-axis bounds</div><div class="ttdef"><b>Definition:</b> Rect.h:58</div></div>
<div class="ttc" id="_m_n_n_define_8h_html_ae353a9c1a1afe84eeefafac7d7f5bed1"><div class="ttname"><a href="_m_n_n_define_8h.html#ae353a9c1a1afe84eeefafac7d7f5bed1">MNN_ASSERT</a></div><div class="ttdeci">#define MNN_ASSERT(x)</div><div class="ttdef"><b>Definition:</b> MNNDefine.h:41</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html">MNN::CV::Rect</a></div><div class="ttdef"><b>Definition:</b> Rect.h:54</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a344296c6a536e3c5734e6f4ff431b33a"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a344296c6a536e3c5734e6f4ff431b33a">MNN::CV::Rect::Intersects</a></div><div class="ttdeci">static bool Intersects(const Rect &amp;a, const Rect &amp;b)</div><div class="ttdef"><b>Definition:</b> Rect.h:532</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_aab144e0eca8fa19ae44d109ae4fe0d94"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#aab144e0eca8fa19ae44d109ae4fe0d94">MNN::CV::Rect::isetWH</a></div><div class="ttdeci">void isetWH(int width, int height)</div><div class="ttdef"><b>Definition:</b> Rect.h:312</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a0359c6cdfd938d0b8d0396315d996904"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0359c6cdfd938d0b8d0396315d996904">MNN::CV::Rect::fRight</a></div><div class="ttdeci">float fRight</div><div class="ttdoc">larger x-axis bounds</div><div class="ttdef"><b>Definition:</b> Rect.h:57</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a91a1f1f6e70c37968942769543a49e2d"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a91a1f1f6e70c37968942769543a49e2d">MNN::CV::Rect::offset</a></div><div class="ttdeci">void offset(float dx, float dy)</div><div class="ttdef"><b>Definition:</b> Rect.h:401</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a64258783d446020019f2062282afdcdd"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a64258783d446020019f2062282afdcdd">MNN::CV::Rect::fLeft</a></div><div class="ttdeci">float fLeft</div><div class="ttdoc">smaller x-axis bounds</div><div class="ttdef"><b>Definition:</b> Rect.h:55</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_ac0571b2879b52e0c733428b47c3880e2"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#ac0571b2879b52e0c733428b47c3880e2">MNN::CV::Rect::isSorted</a></div><div class="ttdeci">bool isSorted() const</div><div class="ttdef"><b>Definition:</b> Rect.h:153</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a6e83b53b1d3474fedcab0b52660acd8e"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a6e83b53b1d3474fedcab0b52660acd8e">MNN::CV::Rect::iset</a></div><div class="ttdeci">void iset(int left, int top, int right, int bottom)</div><div class="ttdef"><b>Definition:</b> Rect.h:298</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_point_html_a2039eaa2814e289541b3f895af6452b4"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_point.html#a2039eaa2814e289541b3f895af6452b4">MNN::CV::Point::set</a></div><div class="ttdeci">void set(float x, float y)</div><div class="ttdef"><b>Definition:</b> Rect.h:41</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_acc003e093d8ccb40326cd4bb45f80c50"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#acc003e093d8ccb40326cd4bb45f80c50">MNN::CV::Rect::joinNonEmptyArg</a></div><div class="ttdeci">void joinNonEmptyArg(const Rect &amp;r)</div><div class="ttdef"><b>Definition:</b> Rect.h:571</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_ada503f876d48a20715410a6d693eb588"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#ada503f876d48a20715410a6d693eb588">MNN::CV::Rect::MakeIWH</a></div><div class="ttdeci">static Rect MakeIWH(int w, int h)</div><div class="ttdef"><b>Definition:</b> Rect.h:103</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_ad29c16121be6701ae8bddfc19b8e0af8"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#ad29c16121be6701ae8bddfc19b8e0af8">MNN::CV::Rect::isEmpty</a></div><div class="ttdeci">bool isEmpty() const</div><div class="ttdef"><b>Definition:</b> Rect.h:141</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a1a01972b232acc3d8a90719e548d919e"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a1a01972b232acc3d8a90719e548d919e">MNN::CV::Rect::y</a></div><div class="ttdeci">float y() const</div><div class="ttdef"><b>Definition:</b> Rect.h:171</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_point_html_ad1aa7aaf6cc726034f15ebd133b288b8"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_point.html#ad1aa7aaf6cc726034f15ebd133b288b8">MNN::CV::Point::fY</a></div><div class="ttdeci">float fY</div><div class="ttdef"><b>Definition:</b> Rect.h:39</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a0f11ca8d611000b282c38daa3dc4cab9"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a0f11ca8d611000b282c38daa3dc4cab9">MNN::CV::Rect::sort</a></div><div class="ttdeci">void sort()</div><div class="ttdef"><b>Definition:</b> Rect.h:609</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_acec8cf044453b6b618d993430ec08973"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#acec8cf044453b6b618d993430ec08973">MNN::CV::Rect::inset</a></div><div class="ttdeci">void inset(float dx, float dy)</div><div class="ttdef"><b>Definition:</b> Rect.h:431</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_af779724236a4e6f70a1c83e64fb34f62"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#af779724236a4e6f70a1c83e64fb34f62">MNN::CV::Rect::set</a></div><div class="ttdeci">void set(float left, float top, float right, float bottom)</div><div class="ttdef"><b>Definition:</b> Rect.h:268</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_aa514595203fd1b7523507c6f97646781"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa514595203fd1b7523507c6f97646781">MNN::CV::Rect::offsetTo</a></div><div class="ttdeci">void offsetTo(float newX, float newY)</div><div class="ttdef"><b>Definition:</b> Rect.h:414</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_point_html_a55914f6553f4649a29cfda5cc6ef2368"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_point.html#a55914f6553f4649a29cfda5cc6ef2368">MNN::CV::Point::fX</a></div><div class="ttdeci">float fX</div><div class="ttdef"><b>Definition:</b> Rect.h:38</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a72efee72527d4c6ae1a9475f629c6ac0"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a72efee72527d4c6ae1a9475f629c6ac0">MNN::CV::Rect::makeOffset</a></div><div class="ttdeci">Rect makeOffset(float dx, float dy) const</div><div class="ttdef"><b>Definition:</b> Rect.h:357</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a8b8118759f998e6e692bddeb4f238c6d"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a8b8118759f998e6e692bddeb4f238c6d">MNN::CV::Rect::joinPossiblyEmptyRect</a></div><div class="ttdeci">void joinPossiblyEmptyRect(const Rect &amp;r)</div><div class="ttdef"><b>Definition:</b> Rect.h:587</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a3a00e95e1c00e82ac601a21ac6694463"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a3a00e95e1c00e82ac601a21ac6694463">MNN::CV::Rect::setWH</a></div><div class="ttdeci">void setWH(float width, float height)</div><div class="ttdef"><b>Definition:</b> Rect.h:339</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a01177c3c1c082e37bc19527e7c2b663f"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a01177c3c1c082e37bc19527e7c2b663f">MNN::CV::Rect::top</a></div><div class="ttdeci">float top() const</div><div class="ttdef"><b>Definition:</b> Rect.h:189</div></div>
<div class="ttc" id="_m_n_n_define_8h_html_a692428e2a0af8ffb79376d223a0695ab"><div class="ttname"><a href="_m_n_n_define_8h.html#a692428e2a0af8ffb79376d223a0695ab">MNN_PUBLIC</a></div><div class="ttdeci">#define MNN_PUBLIC</div><div class="ttdef"><b>Definition:</b> MNNDefine.h:53</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_ac1b5a5bc3392e58b7e9fb00da124a861"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#ac1b5a5bc3392e58b7e9fb00da124a861">MNN::CV::Rect::asScalars</a></div><div class="ttdeci">const float * asScalars() const</div><div class="ttdef"><b>Definition:</b> Rect.h:636</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_ab616f3320e1872a2f9808f0e8d5a86c8"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#ab616f3320e1872a2f9808f0e8d5a86c8">MNN::CV::Rect::outset</a></div><div class="ttdeci">void outset(float dx, float dy)</div><div class="ttdef"><b>Definition:</b> Rect.h:448</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_af67332903693248a739ca9f70cb0b5d4"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#af67332903693248a739ca9f70cb0b5d4">MNN::CV::Rect::MakeEmpty</a></div><div class="ttdeci">static constexpr Rect MakeEmpty()</div><div class="ttdef"><b>Definition:</b> Rect.h:67</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a383b4f2f97e8a4cb7e78388f599cc9c4"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a383b4f2f97e8a4cb7e78388f599cc9c4">MNN::CV::Rect::MakeLTRB</a></div><div class="ttdeci">static constexpr Rect MakeLTRB(float l, float t, float r, float b)</div><div class="ttdef"><b>Definition:</b> Rect.h:118</div></div>
<div class="ttc" id="namespace_m_n_n_html"><div class="ttname"><a href="namespace_m_n_n.html">MNN</a></div><div class="ttdef"><b>Definition:</b> AutoTime.hpp:16</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a2b3840d59c7e57fea47cf22cb380443c"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a2b3840d59c7e57fea47cf22cb380443c">MNN::CV::Rect::setEmpty</a></div><div class="ttdeci">void setEmpty()</div><div class="ttdef"><b>Definition:</b> Rect.h:255</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_aa7fc5d37b129f7f1f29a1e42f6539ad3"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa7fc5d37b129f7f1f29a1e42f6539ad3">MNN::CV::Rect::height</a></div><div class="ttdeci">float height() const</div><div class="ttdef"><b>Definition:</b> Rect.h:225</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_aadf1130e452a00fe072058829c8c8bcd"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#aadf1130e452a00fe072058829c8c8bcd">MNN::CV::Rect::bottom</a></div><div class="ttdeci">float bottom() const</div><div class="ttdef"><b>Definition:</b> Rect.h:207</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_af58f6d07f1c5cb1622f3878ee9d3e8f2"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#af58f6d07f1c5cb1622f3878ee9d3e8f2">MNN::CV::Rect::x</a></div><div class="ttdeci">float x() const</div><div class="ttdef"><b>Definition:</b> Rect.h:162</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_point_html"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_point.html">MNN::CV::Point</a></div><div class="ttdef"><b>Definition:</b> Rect.h:37</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a6aece72c48ea4638f1a21f0a9aa4fed6"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a6aece72c48ea4638f1a21f0a9aa4fed6">MNN::CV::Rect::setXYWH</a></div><div class="ttdeci">void setXYWH(float x, float y, float width, float height)</div><div class="ttdef"><b>Definition:</b> Rect.h:326</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a532c1b7e17793f40cf2dccde039d7930"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a532c1b7e17793f40cf2dccde039d7930">MNN::CV::Rect::setLTRB</a></div><div class="ttdeci">void setLTRB(float left, float top, float right, float bottom)</div><div class="ttdef"><b>Definition:</b> Rect.h:284</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a380de5592d15cce1ccdcd65d6f6233f0"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a380de5592d15cce1ccdcd65d6f6233f0">MNN::CV::Rect::makeSorted</a></div><div class="ttdeci">Rect makeSorted() const</div><div class="ttdef"><b>Definition:</b> Rect.h:626</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a1751c3784411427f17270f3c68e0093e"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a1751c3784411427f17270f3c68e0093e">MNN::CV::Rect::intersects</a></div><div class="ttdeci">bool intersects(const Rect &amp;r) const</div><div class="ttdef"><b>Definition:</b> Rect.h:521</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a9c059082d158da6e4e4bf1b8a3201041"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a9c059082d158da6e4e4bf1b8a3201041">MNN::CV::Rect::right</a></div><div class="ttdeci">float right() const</div><div class="ttdef"><b>Definition:</b> Rect.h:198</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a8b3545f0e12bff349c1071f0a0b655fb"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a8b3545f0e12bff349c1071f0a0b655fb">MNN::CV::Rect::intersects</a></div><div class="ttdeci">bool intersects(float left, float top, float right, float bottom) const</div><div class="ttdef"><b>Definition:</b> Rect.h:511</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a3a4c5536bc1d9efff77d41da5645e29d"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a3a4c5536bc1d9efff77d41da5645e29d">MNN::CV::Rect::centerX</a></div><div class="ttdeci">float centerX() const</div><div class="ttdef"><b>Definition:</b> Rect.h:234</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a78fa5256843c96283961017ae007efdc"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a78fa5256843c96283961017ae007efdc">MNN::CV::Rect::centerY</a></div><div class="ttdeci">float centerY() const</div><div class="ttdef"><b>Definition:</b> Rect.h:244</div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_a3b5d14a019fd282f7e05cef663554fbc"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#a3b5d14a019fd282f7e05cef663554fbc">MNN::CV::Rect::makeInset</a></div><div class="ttdeci">Rect makeInset(float dx, float dy) const</div><div class="ttdef"><b>Definition:</b> Rect.h:372</div></div>
<div class="ttc" id="_m_n_n_define_8h_html"><div class="ttname"><a href="_m_n_n_define_8h.html">MNNDefine.h</a></div></div>
<div class="ttc" id="struct_m_n_n_1_1_c_v_1_1_rect_html_aa160cb2eb1fc6135ccc3877d8c87b510"><div class="ttname"><a href="struct_m_n_n_1_1_c_v_1_1_rect.html#aa160cb2eb1fc6135ccc3877d8c87b510">MNN::CV::Rect::left</a></div><div class="ttdeci">float left() const</div><div class="ttdef"><b>Definition:</b> Rect.h:180</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
